using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace MagicAttributeTest
{
  public partial class UCStack : UserControl
  {
    public event GUIEventHandler evResolve;
    public UCStack()
    {
      InitializeComponent();
    }
    public void UpdateGUI()
    {
      lbStackItems.Items.Clear();
      
      List<StackItem> items = Global.World.Stack;
      for (int i = 0; i < items.Count; i++)
      {
        StackItem item = items[i];
        lbStackItems.Items.Add(item);
      }
    }

    private void btnResolve_Click(object sender, EventArgs e)
    {
      if (evResolve != null)
        evResolve();
    }
  }
}
